package com.jspxcms.plug.repository;

import com.jspxcms.common.orm.Limitable;
import com.jspxcms.plug.domain.Resume;
import com.jspxcms.plug.domain.UserExchange;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;

import java.util.Collection;
import java.util.List;

public interface UserExchangeDao extends Repository<UserExchange, Integer>, UserExchangeDaoPlus {

    public UserExchange save(UserExchange bean);

    public Page<UserExchange> findAll(Specification<UserExchange> spec, Pageable pageable);

    //public UserExchange update(UserExchange bean);

    public List<UserExchange> findByUserIdAndGoodsId(Integer userId,Integer goodsId);

    /**
     * 根据ID获取用户申请
     * @param id
     * @return
     */
    public UserExchange findById(Integer id);



}
